package hikari.persistence.propertieseditor.annotation;

import com.gooddies.texteditors.validation.AbstractValidator;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 *
 * @author sad
 */
@Retention(RetentionPolicy.RUNTIME)
public @interface Property {
    String id();
    
    Class editor() default DEFAULTEDITOR.class;

    String caption();

    String min() default "undefined";

    String max() default "undefined";

    String help() default "undefined";
    
    String maxLength() default "undefined";

    Class<? extends AbstractValidator> validator() default DEFAULTVALIDATOR.class;

    static final class DEFAULTEDITOR {
    }

    static final class DEFAULTVALIDATOR extends AbstractValidator {

        @Override
        public boolean validate(String text) {
            throw new UnsupportedOperationException("Not supported yet.");
        }
    }
}
